package com.klhappy.houyuan.modle;

import android.content.Context;
import android.util.Log;

import com.klhappy.houyuan.constant.KeyConstant;
import com.klhappy.houyuan.constant.UrlConstant;
import com.klhappy.houyuan.utils.BaseModel;
import com.klhappy.houyuan.utils.ConfigManager;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by MrPu on 15/11/26.
 */
public class LanZiModle extends BaseModel {

    private Map<String, String> params = new HashMap<>();

    private ConfigManager manage;

    private String cookie;

    public LanZiModle(Context context) {
        super(context);

        manage = new ConfigManager(context);
        cookie = manage.get(KeyConstant.session, cookie);
    }
    //获取篮子结算商品
    public void getGoods(){
        String path = UrlConstant.GOODS_LANZI_URL;
        cookie = manage.get(KeyConstant.session, cookie);
        Callback(path, params, cookie);
    }
    //删除商品
    public void setGoods(int id){
        String path = UrlConstant.REMOVEGOODS_URL;

        params.put("ids" ,id + "");
        Callback(path ,params ,cookie);
    }
}
